package com.m3958.firstgwt.server.accesschecker;



import com.m3958.firstgwt.server.model.OutWebSite;

public class OutWebSiteChecker extends BaseChecker<OutWebSite> {

	@Override
	protected boolean canAdd() {
		return true;
	}

	@Override
	protected boolean canCustom() {
		return false;
	}

	@Override
	protected boolean canFetch() {
		Boolean ob = reqPs.getFetchOwner();
		if(ob != null && ob){
			return true;
		}
		switch (getSubOpName()) {
		case FETCH_ONE:
			if(rso.isCreator(getModel()))return true;
			break;
		default:
			break;
		}
		return false;
	}

	@Override
	protected boolean canMyRpc() {
		return false;
	}

	@Override
	protected boolean canRemove() {
		return rso.isCreator(getModel());
	}

	@Override
	protected boolean canUpdate() {
		return rso.isCreator(getModel());
	}
}
